<script type="text/html" id="tpl-parts">
	<nav class="btn btn-link" data-id="page"><i class="fa fa-cog"></i> 页面设置</nav>
	<(each initPart as part)>
		<nav class="btn btn-link" data-id="<(part.id)>"><i class="fa fa-plus"></i> <(part.name)></nav>
	<(/each)>
</script>

<script type="text/html" id="tpl-editor-page">
	<div class="form-group">
		<div class="col-sm-2 control-label">海报名称</div>
		<div class="col-sm-10">
			<input class="form-control input-sm diy-bind" data-bind="name" data-placeholder="请输入名称" placeholder="请输入名称" value="<(page.name)>" />
			<div class="help-block">注意：页面名称是便于后台查找，页面标题是手机端标题。</div>
		</div>
	</div>
</script>

<script type="text/html" id="tpl-editor-nickname">
	<div class="form-group">
		<div class="col-sm-2 control-label">昵称颜色</div>
		<div class="col-sm-4">
			<div class="input-group">
				<input class="form-control input-sm diy-bind color" data-bind-child="style" data-bind="color" value="<(style.color)>" type="color" />
				<span class="input-group-addon btn btn-default" onclick="$(this).prev().val('#ffffff').trigger('propertychange')">清除</span>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-2 control-label">字体大小</div>
		<div class="col-sm-10">
			<div class="form-group margin-t-5">
				<div class="slider col-sm-8" data-value="<(style.fontsize)>" data-min="10" data-max="50"></div>
				<div class="col-sm-4 control-labe count"><span><(style.fontsize)></span>px(像素)</div>
				<input class="diy-bind input" data-bind-child="style" data-bind="fontsize" value="<(style.fontsize)>" type="hidden" />
			</div>
		</div>
	</div>
</script>

<script type="text/html" id="tpl-editor-avatar">
	<div class="alert alert-info">
		提示: 头像会直接调用粉丝的微信头像, 您可以在左侧拖拽锚点改变头像的大小尺寸
	</div>
</script>

<script type="text/html" id="tpl-editor-qrcode">
	<div class="alert alert-info">
		提示: 二维码会直接调用系统二维码, 您可以在左侧拖拽锚点改变二维码的大小尺寸
	</div>
	<div class="form-group">
		<div class="col-sm-2 control-label">二维码类型</div>
		<div class="col-sm-10">
			<label class="radio-inline"><input type="radio" name="type" value="wechat" class="diy-bind" data-bind-child="params" data-bind="type" <(if params.type=='wechat')>checked="checked"<(/if)> > 微信二维码</label>
			<label class="radio-inline"><input type="radio" name="type" value="system" class="diy-bind" data-bind-child="params" data-bind="type" <(if params.type=='system')>checked="checked"<(/if)> > 系统二维码</label>
		</div>
	</div>
</script>

<script type="text/html" id="tpl-editor-image">
	<div class="form-group">
		<div class="col-sm-2 control-label">图片</div>
		<div class="col-sm-10">
			<div class="input-group">
				<input class="form-control input-sm diy-bind" data-bind-child="params" data-bind="imgurl" value="<(params.imgurl)>" id="tomedia" />
				<span data-input="#tomedia" data-element="#iconimg" class="input-group-addon btn btn-default js-selectImg">选择图片</span>
			</div>
			<div class="input-group " style="margin-top:.5em;">
				<img src="<(tomedia params.imgurl)>" onerror="this.src='../addons/we7_wmall/static/img/nopic.jpg';" class="img-responsive img-thumbnail" width="150" id="iconimg">
				<span class="close" style="position:absolute; top: -10px; right: -14px;" title="移除图片" onclick="$('#tomedia').val('').trigger('change');$(this).prev().attr('src', '')">×</span>
			</div>
		</div>
	</div>
</script>

<script type="text/html" id="tpl-editor-background">
	<div class="form-group">
		<div class="col-sm-2 control-label">背景图片</div>
		<div class="col-sm-10">
			<div class="input-group">
				<input class="form-control input-sm diy-bind" data-bind-child="params" data-bind="imgurl" value="<(params.imgurl)>" id="tomedia" />
				<span data-input="#tomedia" data-element="#iconimg" class="input-group-addon btn btn-default js-selectImg">选择图片</span>
			</div>
			<div class="input-group " style="margin-top:.5em;">
				<img src="<(tomedia params.imgurl)>" onerror="this.src='../addons/we7_wmall/static/img/nopic.jpg';" class="img-responsive img-thumbnail" width="150" id="iconimg">
				<span class="close" style="position:absolute; top: -10px; right: -14px;" title="移除图片" onclick="$('#tomedia').val('').trigger('change');$(this).prev().attr('src', '')">×</span>
			</div>
			<span class="help-block">背景图片尺寸：640*1008</span>
		</div>
	</div>
</script>

<script type="text/html" id="tpl-editor-text">
	<div class="form-group">
		<div class="col-sm-2 control-label">文字颜色</div>
		<div class="col-sm-4">
			<div class="input-group">
				<input class="form-control input-sm diy-bind color" data-bind-child="style" data-bind="color" value="<(style.color)>" type="color" />
				<span class="input-group-addon btn btn-default" onclick="$(this).prev().val('#ffffff').trigger('propertychange')">清除</span>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-2 control-label">字体大小</div>
		<div class="col-sm-10">
			<div class="form-group margin-t-5">
				<div class="slider col-sm-8" data-value="<(style.fontsize)>" data-min="10" data-max="50"></div>
				<div class="col-sm-4 control-labe count"><span><(style.fontsize)></span>px(像素)</div>
				<input class="diy-bind input" data-bind-child="style" data-bind="fontsize" value="<(style.fontsize)>" type="hidden" />
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-2 control-label">文字内容</div>
		<div class="col-sm-10">
			<input class="form-control input-sm diy-bind" data-bind-child="params" data-bind="content"  placeholder="请输入内容文字" value="<(params.content)>" />
		</div>
	</div>
</script>

